﻿using Abp.Domain.Entities;
using Abp.Domain.Entities.Auditing;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text;

namespace FwProject.ShoppingMall.Com
{
    /// <summary>
    /// 供应商
    /// </summary>
    [Table("shop_supplier")]
    public class ShopSupplier : FullAuditedEntity<Guid>, IPassivable
    {
        public const int MaxSupplierNameLength = 50;
        public const int MaxSupplierTelLength = 13;
        public const int MaxSupplierAddressLength = 200;
        /// <summary>
        /// 供应商名称
        /// </summary>
        [Required]
        [MaxLength(MaxSupplierNameLength)]
        public string SupplierName { get; set; }

        /// <summary>
        /// 供应商电话
        /// </summary>
        [Required]
        [MaxLength(MaxSupplierTelLength)]
        public string SupplierTel { get; set; }

        /// <summary>
        /// 供应商地址
        /// </summary>
        [Required]
        [MaxLength(MaxSupplierAddressLength)]
        public string SupplierAddress { get; set; }

        #region IPassivable
        /// <summary>
        /// 是否激活（实现IPassivable接口）
        /// </summary>
        public bool IsActive { get; set; } = true;
        #endregion

    }
}
